package com.qf.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.qf.service.ICategoryService;
import com.qf.entity.Category;
import com.qf.mapper.CategoryMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 商品分类 服务实现类
 * </p>
 *
 * @author one
 * @since 2021-11-01
 */
@Service
public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> implements ICategoryService {
    private CategoryMapper categoryMapper;

    public CategoryServiceImpl(CategoryMapper categoryMapper) {
        this.categoryMapper = categoryMapper;
    }

    @Override
    public List<Category> findAllCategories() {
        return categoryMapper.selectList(Wrappers.emptyWrapper());
    }
}
